package cn.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class OrdersExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrdersExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdIsNull() {
            addCriterion("ordersGoodsId is null");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdIsNotNull() {
            addCriterion("ordersGoodsId is not null");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdEqualTo(Long value) {
            addCriterion("ordersGoodsId =", value, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdNotEqualTo(Long value) {
            addCriterion("ordersGoodsId <>", value, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdGreaterThan(Long value) {
            addCriterion("ordersGoodsId >", value, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ordersGoodsId >=", value, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdLessThan(Long value) {
            addCriterion("ordersGoodsId <", value, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdLessThanOrEqualTo(Long value) {
            addCriterion("ordersGoodsId <=", value, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdIn(List<Long> values) {
            addCriterion("ordersGoodsId in", values, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdNotIn(List<Long> values) {
            addCriterion("ordersGoodsId not in", values, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdBetween(Long value1, Long value2) {
            addCriterion("ordersGoodsId between", value1, value2, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersGoodsIdNotBetween(Long value1, Long value2) {
            addCriterion("ordersGoodsId not between", value1, value2, "ordersGoodsId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdIsNull() {
            addCriterion("ordersCusId is null");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdIsNotNull() {
            addCriterion("ordersCusId is not null");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdEqualTo(Long value) {
            addCriterion("ordersCusId =", value, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdNotEqualTo(Long value) {
            addCriterion("ordersCusId <>", value, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdGreaterThan(Long value) {
            addCriterion("ordersCusId >", value, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ordersCusId >=", value, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdLessThan(Long value) {
            addCriterion("ordersCusId <", value, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdLessThanOrEqualTo(Long value) {
            addCriterion("ordersCusId <=", value, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdIn(List<Long> values) {
            addCriterion("ordersCusId in", values, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdNotIn(List<Long> values) {
            addCriterion("ordersCusId not in", values, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdBetween(Long value1, Long value2) {
            addCriterion("ordersCusId between", value1, value2, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersCusIdNotBetween(Long value1, Long value2) {
            addCriterion("ordersCusId not between", value1, value2, "ordersCusId");
            return (Criteria) this;
        }

        public Criteria andOrdersDateIsNull() {
            addCriterion("ordersDate is null");
            return (Criteria) this;
        }

        public Criteria andOrdersDateIsNotNull() {
            addCriterion("ordersDate is not null");
            return (Criteria) this;
        }

        public Criteria andOrdersDateEqualTo(Date value) {
            addCriterionForJDBCDate("ordersDate =", value, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("ordersDate <>", value, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateGreaterThan(Date value) {
            addCriterionForJDBCDate("ordersDate >", value, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ordersDate >=", value, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateLessThan(Date value) {
            addCriterionForJDBCDate("ordersDate <", value, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ordersDate <=", value, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateIn(List<Date> values) {
            addCriterionForJDBCDate("ordersDate in", values, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("ordersDate not in", values, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ordersDate between", value1, value2, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ordersDate not between", value1, value2, "ordersDate");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressIsNull() {
            addCriterion("ordersAddress is null");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressIsNotNull() {
            addCriterion("ordersAddress is not null");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressEqualTo(String value) {
            addCriterion("ordersAddress =", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressNotEqualTo(String value) {
            addCriterion("ordersAddress <>", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressGreaterThan(String value) {
            addCriterion("ordersAddress >", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressGreaterThanOrEqualTo(String value) {
            addCriterion("ordersAddress >=", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressLessThan(String value) {
            addCriterion("ordersAddress <", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressLessThanOrEqualTo(String value) {
            addCriterion("ordersAddress <=", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressLike(String value) {
            addCriterion("ordersAddress like", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressNotLike(String value) {
            addCriterion("ordersAddress not like", value, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressIn(List<String> values) {
            addCriterion("ordersAddress in", values, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressNotIn(List<String> values) {
            addCriterion("ordersAddress not in", values, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressBetween(String value1, String value2) {
            addCriterion("ordersAddress between", value1, value2, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersAddressNotBetween(String value1, String value2) {
            addCriterion("ordersAddress not between", value1, value2, "ordersAddress");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyIsNull() {
            addCriterion("ordersMoney is null");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyIsNotNull() {
            addCriterion("ordersMoney is not null");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyEqualTo(Double value) {
            addCriterion("ordersMoney =", value, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyNotEqualTo(Double value) {
            addCriterion("ordersMoney <>", value, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyGreaterThan(Double value) {
            addCriterion("ordersMoney >", value, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyGreaterThanOrEqualTo(Double value) {
            addCriterion("ordersMoney >=", value, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyLessThan(Double value) {
            addCriterion("ordersMoney <", value, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyLessThanOrEqualTo(Double value) {
            addCriterion("ordersMoney <=", value, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyIn(List<Double> values) {
            addCriterion("ordersMoney in", values, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyNotIn(List<Double> values) {
            addCriterion("ordersMoney not in", values, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyBetween(Double value1, Double value2) {
            addCriterion("ordersMoney between", value1, value2, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersMoneyNotBetween(Double value1, Double value2) {
            addCriterion("ordersMoney not between", value1, value2, "ordersMoney");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusIsNull() {
            addCriterion("ordersStatus is null");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusIsNotNull() {
            addCriterion("ordersStatus is not null");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusEqualTo(Integer value) {
            addCriterion("ordersStatus =", value, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusNotEqualTo(Integer value) {
            addCriterion("ordersStatus <>", value, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusGreaterThan(Integer value) {
            addCriterion("ordersStatus >", value, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("ordersStatus >=", value, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusLessThan(Integer value) {
            addCriterion("ordersStatus <", value, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusLessThanOrEqualTo(Integer value) {
            addCriterion("ordersStatus <=", value, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusIn(List<Integer> values) {
            addCriterion("ordersStatus in", values, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusNotIn(List<Integer> values) {
            addCriterion("ordersStatus not in", values, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusBetween(Integer value1, Integer value2) {
            addCriterion("ordersStatus between", value1, value2, "ordersStatus");
            return (Criteria) this;
        }

        public Criteria andOrdersStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("ordersStatus not between", value1, value2, "ordersStatus");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}